/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.poll.factor.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.poll.common.constant.enums.PollModDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 数据展示因子
 *
 * @author ljh
 * @date 2023-05-22 10:00:56
 */
@Data
@TableName("poll_display_factor")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "数据展示因子")
public class PollDisplayFactorEntity extends Model<PollDisplayFactorEntity> {

    private static final long serialVersionUID = 1L;


	/**
	* id
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="id")
    private Long id;

	/**
	* 监控类型
	*/
    @Schema(description="监控类型")
    private String monitorType;

	/**
	* 默认展示因子
	*/
    @Schema(description="默认展示因子")
    private String factorIds;

	/**
	* 展示因子名
	*/
    @Schema(description="展示因子名")
    private String factorNames;

	/**
	 * 单位
	 */
	@Schema(description="单位")
	private String unit;

	/**
	 * 统计单位
	 */
	@Schema(description="统计单位")
	private String unitStatistics;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remarks;

	/**
	* orgId
	*/
    @Schema(description="orgId")
    private Long orgId;

    public String getMonitorTypeStr() {
        return DictResolver.getItemLabelByValue(PollModDictEnum.site_type, this.monitorType);
    }
}
